{% extends 'layout.html' %}

{% block main %}
<ol class="breadcrumb">
    <li><a href="/admin">管理首页</a></li>
    <li class="active">用户列表</li>
</ol>
<h1 class="page-header">用户列表</h1>
<div class="table-responsive">
  {% set a = 'user' %}
  {% include 'page.html' %}

  <table class="table table-striped table-hover">
    <thead>
      <tr>
        <th>用户名</th>
        <th>密码</th>
        <th>ID</th>
        <th>是否是管理员</th>
      </tr>
    </thead>
    <tbody>

      {% for user in users %}
      <tr>
        <td> {{user.username}} </td>
        <td> {{user.password}} </td>
        <td> {{user._id.toString()}} </td>
        <td> {{user.isAdmin}} </td>
      </tr>
      {% endfor %}
    </tbody>
  </table>

</div>

{% endblock %}